XML.send()

Availability

Flash Player 5.

Usage

my_xml.send(url:String, [window:String]) : Void

Parameters

url String; the destination URL for the specified XML object.

window String; the browser window to show data that the server returns:

Returns

Nothing.

Description

Method; encodes the specified XML object into an XML document, and sends it to the specified URL using the POST method in a browser. The Flash test environment only uses the GET method.

Example

The following example defines an XML packet and sets the content type for the XML object. The data is then sent to a server and shows a result in a browser window.

var my_xml:XML = new XML("<highscore><name>Ernie</name>
<score>13045</score></highscore>"); my_xml.contentType = "text/xml"; my_xml.send("http://www.flash-mx.com/mm/highscore.cfm", "_blank");

Press F12 to test this example in a browser.

See also

XML.sendAndLoad()